<?php

//RECEBE O ESTADO

//    $codTributacaoMunicipio = $_GET['codTributacaoMunicipio'];

    mysql_connect('localhost:3306', 'root', ''); //REALIZA A CONEXAO
    mysql_select_db('mydb'); //SELECIONA O DB
//EXECUTAR CONSULTA
//    $result = mysql_query("SELECT * FROM servico WHERE idGrupoServicos = '{$codTributacaoMunicipio}'");
//
//    while ($row = mysql_fetch_array($result)) {
//        echo "<option value='" . $row['idservico'] . "'>" . (utf8_encode($row['discriminacao'])) . "</option>";
//    }
    ?>
    <?php

    $idservico = $_GET['grupo_servicos'];
    mysql_connect('localhost:3306', 'root', '');
    mysql_select_db('mydb');
    $result = mysql_query("SELECT * FROM servico WHERE idGrupoServicos = " . $idservico);
    while ($row = mysql_fetch_array($result)) {
        echo "<option value='" . $row['idservico'] . "'>" . $row['codServico'] . " - " . $row['discriminacao'] . "</option>";
    }
?>

